package gui.entity;

import generated.domain.user.User;

import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.ui.views.properties.IPropertySource;

public class UserEntity implements IAdaptable {
	private User user;
	private Object userElementPropertySource;

	public UserEntity(User pUser) {
		user = pUser;
	}

	public Object getAdapter(Class adapter) {
		if (adapter == IPropertySource.class) {
			if (userElementPropertySource == null) {
				userElementPropertySource = new UserElementPropertySource(this);
			}
			return userElementPropertySource;
		}
		return null;
	}

	/**
	 * @return the user
	 */
	public User getUser() {
		return user;
	}
}